//
//  URLDownloadConnection.m
//  Symphony
//
//  Created by Pang Jun on 4/24/12.
//  Copyright 2012 __MyCompanyName__. All rights reserved.
//

#import "URLDownloadConnection.h"

//NSCondition * cocoaCondition;

@implementation URLDownloadConnection

- (id)init
{
    self = [super init];
    if (self) 
    {
    }
    
    return self;
}

#pragma mark - 
#pragma mark Download Interface

-(NSString *)DownloadData:(NSString *)reqURL
{
    NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];         
    [request setURL:[NSURL URLWithString:reqURL]];
    [request setHTTPMethod:@"GET"];
    NSData *returnData = [NSURLConnection sendSynchronousRequest:request 
                                               returningResponse:nil error:nil];
    [request release];
    NSString *returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding];
    return returnString;
}
@end
